package main

import (
	"fmt"
	"github.com/zhan3333/glog"
	"log"
	"log/syslog"
	"net"
)

var g_log *log.Logger

func initGlobal() {
	g_log, _ = syslog.NewLogger(syslog.LOG_NOTICE, 0)
}

func zLog(conn *net.Conn, args ...interface{}) {
	var sIP string

	if conn != nil {
		sIP = (*conn).RemoteAddr().String()
	} else {
		sIP = ""
	}
	sAtt := fmt.Sprint(args...)
	//g_log.Println(sIP, sAtt)
	glog.Channel("pushd").Infof(sIP, sAtt)
}
